package com.recsmile.sgs.listener;

import com.recsmile.sgs.core.Player;
import com.recsmile.sgs.entity.Card;
import com.recsmile.sgs.entity.PlayerSimple;

import javax.swing.*;

/**
 * Created by Administrator on 2016/8/29.
 */
public interface GameListener {
    /**
 * invoked when a new player is added to game
 * @param player
 */
public void onPlayerAdded(PlayerSimple player);
    /**
     * invoked when a card on hand is selected
     * @param card
     */
    public void setCardSelected(Card card, boolean selected);
    /**
     * invoked when a target is selected
     * @param player
     */
    public void setTargetSelected(Player player, boolean selected);
    /**
     * invoked when a card on hand is set selectable/unselectable
     * @param card
     * @param selectable
     */
    public void setCardSelectable(Card card, boolean selectable);
    /**
     * invoked when a target is set selectable/unselectable
     * @param player
     * @param selectable
     */
    public void setTargetSelectable(Player player, boolean selectable);

    /**
     * update the size of game deck
     * @param size
     */
    public void setDeckSize(int size);

    public void setMessage(String message);

    public void clearMessage();

    /**
     * Display the card selection pane on screen
     * @param player : the owner of these cards
     * @param showHand : whether to display player's cards on hand
     * @param showEquipments : whether to display player's equipments
     * @param showDecisions : whether to display player's decision area
     */
    public void onDisplayCardSelectionPane(PlayerSimple player, boolean showHand, boolean showEquipments, boolean showDecisions);

    public void onDisplayCustomizedSelectionPaneAtCenter(JPanel panel);

    public void onRemoveCustomizedSelectionPane();
    public void setCancelEnabled(boolean b);
    public void setConfirmEnabled(boolean b);
}
